package com.hb.back.controller;

import com.hb.common.domain.EduSubject;
import com.hb.common.service.EduSubjectService;
import com.hb.common.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/subject")
public class SubjectController {
    @Autowired
    EduSubjectService subjectService;

    @GetMapping("/list")
    public ResultVo list(){
      List<EduSubject> allSubject = subjectService.getAllSubject();
      return ResultVo.success("",allSubject);
    }
}
